/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package eproject_sem2;

import javax.swing.JInternalFrame;

/**
 *
 * @author ZER0
 */
public class Show_Price_Area extends javax.swing.JFrame {

    ListOfPrice_Sever a = new ListOfPrice_Sever();

    public JInternalFrame getItfPArea() {
        return itfPArea;
    }
    
    /**
     * Creates new form Show_Price_Area
     */
    public Show_Price_Area() {
        initComponents();
        a.ShowTable("STTA", "GAreaID", "GAreaName", "Distance", "Prices_by_Area", tbAreaE);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        itfPArea = new javax.swing.JInternalFrame();
        jpIPAreaE = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbAreaE = new javax.swing.JTable();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        itfPArea.setClosable(true);
        itfPArea.setVisible(true);

        jpIPAreaE.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1), "Area information", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12))); // NOI18N

        tbAreaE.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "STTA", "GAreaID", "GAreaName", "Distance"
            }
        ));
        tbAreaE.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tbAreaEMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(tbAreaE);

        javax.swing.GroupLayout jpIPAreaELayout = new javax.swing.GroupLayout(jpIPAreaE);
        jpIPAreaE.setLayout(jpIPAreaELayout);
        jpIPAreaELayout.setHorizontalGroup(
            jpIPAreaELayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 752, Short.MAX_VALUE)
        );
        jpIPAreaELayout.setVerticalGroup(
            jpIPAreaELayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 483, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout itfPAreaLayout = new javax.swing.GroupLayout(itfPArea.getContentPane());
        itfPArea.getContentPane().setLayout(itfPAreaLayout);
        itfPAreaLayout.setHorizontalGroup(
            itfPAreaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jpIPAreaE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        itfPAreaLayout.setVerticalGroup(
            itfPAreaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jpIPAreaE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(itfPArea)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(itfPArea, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void tbAreaEMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbAreaEMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_tbAreaEMouseClicked

    /**
     * @param args the command line arguments
     */

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JInternalFrame itfPArea;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPanel jpIPAreaE;
    private javax.swing.JTable tbAreaE;
    // End of variables declaration//GEN-END:variables
}
